<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <title>自助报表</title>
        <link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/layui/css/layui.css" media="all">
        <link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/font-awesome/css/font-awesome.min.css" media="all">
        <link rel="stylesheet" href="<%=request.getContextPath()%>/src/css/app.css" media="all">
        <script src="<%=request.getContextPath()%>/plugins/layui/layui.js"></script>
    </head>

    <body>
        <div class="layui-layout layui-layout-admin kit-layout-admin">
            <div class="layui-header">
                <div class="layui-logo" style="color: rgba(255, 255, 255, 0.9); font-weight: bold; font-size: 18px;">
                    <img src="${pageContext.request.contextPath}/src/images/title.png">&nbsp;&nbsp;&nbsp;自助报表
                </div>

                <ul class="layui-nav layui-layout-right kit-nav">
                    <li class="layui-nav-item">
                        <a>
                            <img style="width:25px;height: 25px;margin-right: 5px;" src="${pageContext.request.contextPath}/src/images/user.png" class="layui-nav-img"> ${userName}
                        </a>
                        <%--修改密码功能已经实现，需要时放开注释即可--%>
                        <%--<dl class="layui-nav-child">
                            <dd><a href="javascript:;" kit-target data-options="{url:'<%=request.getContextPath()%>/rptTools/user/modifyPassword',icon:'&#xe658;',title:'修改密码',id:'966'}"><span>修改密码</span></a></dd>
                            &lt;%&ndash;<dd><a href="javascript:;">安全设置</a></dd>&ndash;%&gt;
                        </dl>--%>
                    </li>
                    <li class="layui-nav-item"><a href="${pageContext.request.contextPath}/logout"><i class="fa fa-sign-out" aria-hidden="true"></i> 注销</a></li>
                </ul>
            </div>

            <div class="layui-side layui-bg-black kit-side">
                <div class="layui-side-scroll">
                    <div class="kit-side-fold"><i class="fa fa-navicon" aria-hidden="true"></i></div>
                    <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
                    <ul class="layui-nav layui-nav-tree" lay-filter="kitNavbar" kit-navbar>
                        <li class="layui-nav-item layui-nav-itemed">
                            <a class="" href="javascript:;"><i class="fa fa-plug" aria-hidden="true"></i><span> 自助报表</span></a>
                            <dl class="layui-nav-child">
                                <dd>
                                    <a href="javascript:;" kit-target data-options="{url:'<%=request.getContextPath()%>/rptTools/rptMgr/dbCfg',icon:'&#xe658;',title:'数据源管理',id:'2'}">
                                        <i class="layui-icon">&#xe658;</i><span> 数据源管理</span>
                                    </a>
                                </dd>
                                <dd>
                                    <a href="javascript:newTab();" data-options="{url:'/doc.html',icon:'&#xe658;',title:'使用手册',id:'4'}">
                                        <i class="layui-icon">&#xe658;</i><span> 配置说明</span>
                                    </a>
                                </dd>
                                <dd>
                                    <a href="javascript:manual();" data-options="{url:'/doc.html',icon:'&#xe658;',title:'使用手册',id:'5'}">
                                        <i class="layui-icon">&#xe658;</i><span> 使用手册</span>
                                    </a>
                                </dd>
                                <dd>
                                    <a href="javascript:version();" data-options="{url:'/doc.html',icon:'&#xe658;',title:'版本更新',id:'6'}">
                                        <i class="layui-icon">&#xe658;</i><span style="padding-right: 3px;"> 版本更新</span>
                                        <c:if test="${showUpdate eq '1'}">
                                            <img src="<%=request.getContextPath()%>/styles/imgs/new.png">
                                        </c:if>
                                    </a>
                                </dd>
                            </dl>
                        </li>
                        <c:if test="${isAdmin eq '1'}">
                            <li class="layui-nav-item layui-nav-itemed">
                                <a class="" href="javascript:;"><i class="fa fa-plug" aria-hidden="true"></i><span> 系统管理</span></a>
                                <dl class="layui-nav-child">
                                    <dd>
                                        <a href="javascript:;" kit-target data-options="{url:'<%=request.getContextPath()%>/rptTools/user/userMgr',icon:'&#xe658;',title:'用户管理',id:'7'}">
                                            <i class="layui-icon">&#xe658;</i><span> 用户管理</span>
                                        </a>
                                    </dd>
                                    <dd>
                                        <a href="javascript:;" kit-target data-options="{url:'<%=request.getContextPath()%>/rptTools/accessIn/accessInSys',icon:'&#xe658;',title:'报表接入系统',id:'3'}">
                                            <i class="layui-icon">&#xe658;</i><span> 报表接入系统</span>
                                        </a>
                                    </dd>
                                    <dd>
                                        <a href="javascript:;" kit-target data-options="{url:'<%=request.getContextPath()%>/rptTools/sys/versionMgr',icon:'&#xe658;',title:'版本管理',id:'8'}">
                                            <i class="layui-icon">&#xe658;</i><span> 版本管理</span>
                                        </a>
                                    </dd>
                                </dl>
                            </li>
                        </c:if>
                    </ul>
                </div>
            </div>
            <div class="layui-body" id="container">
                <!-- 内容主体区域 -->
                <div style="padding: 15px;">主体内容加载中,请稍等...</div>
            </div>
        </div>
        <script>
            var basePath = "${pageContext.request.contextPath}";

            var message;
            layui.config({
                base: 'src/js/'
            }).use(['app', 'message'], function() {
                var app = layui.app,
                    $ = layui.jquery,
                    layer = layui.layer;
                //将message设置为全局以便子页面调用
                message = layui.message;
                //主入口
                app.set({
                    type: 'iframe'
                }).init();
                $('#pay').on('click', function() {
                    layer.open({
                        title: false,
                        type: 1,
                        content: '<img src="/src/images/pay.png" />',
                        area: ['500px', '250px'],
                        shadeClose: true
                    });
                });
            });

            function newTab() {
                window.open(basePath + "/rptTools/rptMgr/doc");
            }

            function manual() {
                window.open(basePath + "/rptTools/rptMgr/manual");
            }

            function version() {
                window.open(basePath + "/rptTools/sys/version");
            }
        </script>
    </body>
</html>